package com.ysc;

import com.ysc.domain.Student;
import com.ysc.utils.mybatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.io.IOException;
import java.util.List;

public class test2 {

    public static void main(String[] args) throws IOException {
        SqlSession sqlSession = mybatisUtils.getSqlSession();
        String Sqlid = "com.ysc.dao.StudentDao.selectStudents";
        List<Student> studentList = sqlSession.selectList(Sqlid);
        //studentList.forEach(student -> System.out.println(student));
        for(Student stu : studentList){
            System.out.println("查询的学生："+ stu);
        }
        sqlSession.close();
    }
}
